<extend name="default/template/base" />
<block name="area_header">
    <script type="text/javascript" src="__CDN__/jquery-qrcode/v1.0/jquery.qrcode.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/Webview/css/invitationAward.css"/>
</block>
<block name="area_body">
    <div class="wrap">
        <div class="note">
            <b>分享有礼</b><br/>
        </div>
        <div class="idcode">
            <div class="qrcode_url">
                <div class="title">
                    <b>森森休闲</b>
                </div>
                <div id="qrcode">
                </div>
                <div class="idcode-num">
                    邀请码: {$idcode}
                </div>
            </div>
        </div>
        <p style="text-align: left; padding: 0 30px; font-size: 12px">1.通过分享您和您的好友都能获得100积分奖励<br><br>2.新注册用户还能获得总共50元的优惠券，具体在我的资产里查看</p>
    </div>
</block>
<block name="area_footer">
    <script type="text/javascript">
        $(function(){

            var link = "http://sunsun.itboye.com/index.php/Webview/User/register?invite_id={$idcode}";

            $('#qrcode').qrcode({width: 120,height: 120,text: link});

            var qrcode = document.getElementById('qrcode');
            var canvas = qrcode.getElementsByTagName('canvas')[0];

            var image = new Image();
            image.src = canvas.toDataURL();
            qrcode.removeChild(canvas);

            qrcode.appendChild(image);

        })
    </script>
</block>